﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApEportToRTRStatusIssueBuilderScopeToolTipString
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ExportToRTR.Resources;
using System.Collections.Generic;
using System.Text;


namespace DnProcessSimulateCommands.ExportToRTR
{

    internal class CApEportToRTRStatusIssueBuilderScopeToolTipString : CApExportToRTRStatusIssueBuilder
    {
        private StringBuilder m_statusBuilder;
        private int m_numberOfLineBreaks;
        private static (string, string)[] m_statusMetaData = new (string, string)[21]
        {
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (ExportToRTRStringTable.ISSUE04_OUTPUT_NO_PAKAGE_NAME, string.Empty),
    (ExportToRTRStringTable.ISSUE05_TOOL_TIP_OUTPUT_RTR_EXISTING_PAKAGE_NAME, string.Empty),
    (ExportToRTRStringTable.ISSUE12_TOOL_TIP_INVALID_CHARACTERS_PROJECT_NAME, string.Empty),
    (string.Empty, string.Empty),
    (ExportToRTRStringTable.ISSUE11_SCOPE_TOOL_TIP_LOCATION, ExportToRTRStringTable.ISSUE08_SCOPE_TOOL_TIP_LOCATION_CANNOT_BE_REACHED),
    (ExportToRTRStringTable.ISSUE11_SCOPE_TOOL_TIP_LOCATION, ExportToRTRStringTable.ISSUE09_SCOPE_TOOL_TIP_LOCATION_NO_CONFIGURATION),
    (ExportToRTRStringTable.ISSUE11_SCOPE_TOOL_TIP_LOCATION, ExportToRTRStringTable.ISSUE10_SCOPE_TOOL_TIP_LOCATION_COLLISION),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty),
    (string.Empty, string.Empty)
        };

        internal CApEportToRTRStatusIssueBuilderScopeToolTipString(StringBuilder statusBuilder)
        {
            this.m_statusBuilder = statusBuilder;
        }

        internal override void AppendObject(
          CApExportToRTRStatusManager.IssueType type,
          CApExportToRTRStatusObjectIssueData data)
        {
        }

        internal override void AppendObjectList(
          CApExportToRTRStatusManager.IssueType type,
          HashSet<CApExportToRTRStatusObjectIssueData> dataList)
        {
        }

        internal override void AppendTitle(
          CApExportToRTRStatusManager.IssueType type,
          CApExportToRTRStatusManager.Severity severity,
          string additionalData = null)
        {
            int index = (int)type;
            if (CApEportToRTRStatusIssueBuilderScopeToolTipString.m_statusMetaData.Length <= index)
                return;
            string format = CApEportToRTRStatusIssueBuilderScopeToolTipString.m_statusMetaData[index].Item1;
            List<string> stringList = new List<string>();
            if (!string.IsNullOrEmpty(additionalData))
                stringList.Add(additionalData);
            if (!string.IsNullOrEmpty(CApEportToRTRStatusIssueBuilderScopeToolTipString.m_statusMetaData[(int)type].Item2))
                stringList.Add(CApEportToRTRStatusIssueBuilderScopeToolTipString.m_statusMetaData[(int)type].Item2);
            if (severity == CApExportToRTRStatusManager.Severity.Error)
            {
                this.m_statusBuilder.Append("❌ " + string.Format(format, (object[])stringList.ToArray()));
            }
            else
            {
                if (severity != CApExportToRTRStatusManager.Severity.Warning)
                    return;
                this.m_statusBuilder.Append("⚠ " + string.Format(format, (object[])stringList.ToArray()));
            }
        }

        internal override void PreAppendNextObjectList() => this.m_statusBuilder.Append("\n");

        internal override CApExportToRTRStatusIssueBuilder ScopeBuilder
        {
            get => (CApExportToRTRStatusIssueBuilder)null;
        }
    }
}
